<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>relative和absolute</title>
    <style>
        .c1{
            width: 500px;
            height: 300px;
            border: 2px solid red;

            position: relative;
        }
        .c1 .c2{
            width: 50px;
            height: 50px;
            background-color: aqua;

            position: absolute;
            top:50px;
            right: 50px;
        }
    </style>
</head>
<body>

<div class="c1">
    <div class="c2"></div>
</div>

</body>
</html>